package www.com.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import www.com.common.ListResult;
import www.com.entity.Student;
import www.com.mapper.StudentMapper;
import www.com.service.StudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 程序员逐梦
 * @since 2024-03-30
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {

   @Autowired StudentMapper studentMapper;
   @Autowired StudentService studentService;
    @Override
    public ListResult<Student> getStudentList(Student query) {
        List<Student> list = studentMapper.getStudentList(query);
        ListResult<Student> result = new ListResult<Student>();
        System.out.println(studentService.count());
        result.setTotal((long) studentService.count());

        result.setList(list);
        return result;
    }
}
